package com.hzcx.app.simplechat.ui.login.presenter;

import android.content.Context;

import com.hzcx.app.simplechat.api.BaseDialogObserver;
import com.hzcx.app.simplechat.base.BaseEmptyBean;
import com.hzcx.app.simplechat.base.BasePresenter;
import com.hzcx.app.simplechat.model.LoginModel;
import com.hzcx.app.simplechat.ui.login.bean.PhoneCityBean;
import com.hzcx.app.simplechat.ui.login.contract.ForgetPwdContract;
import com.hzcx.app.simplechat.ui.login.contract.PhoneCityContract;

import java.util.List;

public class ForgetPwdPresenter extends BasePresenter<ForgetPwdContract.View> implements ForgetPwdContract.Presenter {

    /**
     *  重置密码
     * @param context
     * @param newpassword
     * @param captcha
     * @param mobile
     */
    @Override
    public void resetPwd(Context context, String newpassword, String captcha, String mobile) {
        LoginModel.forgetPwd(context, newpassword, captcha, mobile, new BaseDialogObserver<BaseEmptyBean>(context) {
            @Override
            protected void onSuccess(BaseEmptyBean data) {
                mView.resetSuccess();
            }
        });
    }
}
